1. Field
Embodiments of the invention relate to the field of network processing; and more specifically, to prioritizing processing of source Media Access Control (MAC) address misses.
2. Background
A layer 2 network bridge (data link layer in the Open Systems Interconnection Basic Reference Model (OSI MODEL), ISO/IEC 7498-1, Nov. 15, 1994) is a device used to connect multiple computing devices from one network to other network(s). The bridge scans incoming data frames for the source MAC address and the destination MAC address. A MAC address is typically a globally unique address of a physical network interface card inside a computing device and usually does not change for the life of the computing device.
A network bridge dynamically builds a forwarding structure based upon the source MAC addresses of the frames it receives and the ports associated with those MAC addresses. A typical architecture of a network bridge includes at least one control card and multiple line cards. The control card includes a parent bridge forwarding structure which stores a master version of the associations between MAC addresses and ports. The control card distributes the content of the parent bridge forwarding structure to each of the line cards (e.g., to child bridge forwarding structures). Thus, each line card typically has an equivalent child bridge forwarding structure that reflects the information in the parent bridge forwarding structure.
Upon receiving a frame, a processor on the line card performs a lookup in its child bridge forwarding structure to determine if the source MAC address is associated with the port the frame was received on. A source MAC address miss is determined if the source MAC address is not associated with the port the frame was received on. For example, a source MAC address miss exists if the MAC address is associated with a different port than the frame was received on, or if the MAC address is not associated with any ports. If the MAC address is associated with a different port than the frame was received on, the source MAC address has moved. This is referred to as a source MAC address move (e.g., the source MAC address has moved between ports). Source MAC address moves may occur for expected (legitimate) reasons (e.g., the computing device associated with that source MAC address has physically moved locations) and/or unexpected (illegitimate) reasons (e.g., a bridge forwarding loop). A bridge forwarding loop may cause many source MAC address misses in a short amount of time.
If the line card determines there is a source MAC address miss, the line card sends a source MAC address miss message to a processor on the control card so that the processor may update the parent bridge forwarding structure (e.g., to create an association between that MAC address and that port, or to modify the current association to reflect the source MAC address move). If there are many source MAC address misses (e.g., in the case of a bridge forwarding loop), the source MAC address miss messages are queued to the processor. The control card updates its parent bridge forwarding structure and distributes the update to each of the child bridge forwarding structures on the line cards. Depending on the load on the CPU, this process may take several seconds.